<template>
	<view class="mine">
		<view class="banner">
			<image :src="content.thumb" mode="widthFix"></image>
		</view>
		<view class="content">
			<view class="title">{{content.title}}</view>
			<view class="des" v-html="content.content"></view>
		</view>
		<view class="recommend">
			<view class="recom_title">相关藏品</view>
			<view class="recom_cont">
				<block v-for="item in content.special_list" :key="item.id">
					<view class="item" @tap="toPage(`/subpage/Product/details?id=${item.id}`)">
						<image :src="item.thumb" mode="aspectFill"></image>
						<view class="cont">
							<view class="title u-line-1">{{item.title}}</view>
							<view class="number">
								<text>限量</text>
								<text>{{item.all_count}}份</text>
							</view>
							<view class="price">¥ {{item.base_price}}</view>
						</view>
					</view>
				</block>
			</view>
		</view>
	</view>
</template>

<script>
	import {mixin} from '@/Mixins/mixin.js'
	export default {
		mixins:[mixin],
		data() {
			return {
				content:{}
			}
		},
		onReady() {
			
		},
		onLoad(e) {
			console.log('[参数]',e)
			this.getDetail(e.id)
		},
		methods: {
			//获取列表
			async getDetail(id){
				let list = await this.articleRead(id)
				if(list.code == 200){
					this.content = list.data
				}
			},
		}
	}
</script>

<style lang="scss" scoped>
	.mine{
		min-height: 100vh;
		background-color: #f5f5f5;
		box-sizing: border-box;
		.banner{
			image{
				width: 100%;
				height: auto;
			}
		}
		.content{
			background-color: #1E2020;
			padding: 24rpx 30rpx;
			.title{
				font-size: 42rpx;
				font-weight: 400;
				color: #FFFFFF;
				line-height: 60rpx;
				letter-spacing: 2px;
			}
			.des{
				margin-top: 14rpx;
				font-size: 28rpx;
				font-weight: 400;
				color: #B8BBBA;
				line-height: 48rpx;
				letter-spacing: 1px;
			}
		}
		.recommend{
			margin-top: 20rpx;
			padding:30rpx;
			background-color: #f5f5f5;
			.recom_title{
				font-size: 38rpx;
				font-weight: 600;
				color: #000;
				line-height: 60rpx;
				letter-spacing: 2px;
				margin-bottom: 30rpx;
			}
			.item{
				background: white;
				margin-bottom: 36rpx;
				border-radius: 42rpx;
				display: flex;
				justify-content: space-between;
				align-items: center;
				image{
					width: 238rpx;
					height: 236rpx;
					border-radius: 42rpx;
				}
				.cont{
					width: calc(100% - 238rpx);
					box-sizing: border-box;
					padding: 40rpx 26rpx 26rpx 26rpx;
					.title{
						font-size: 34rpx;
						font-weight: 900;
						color: #000;
						margin-bottom: 16rpx;
					}
					.number{
						font-size: 0;
						margin-bottom: 32rpx;
						text{
							font-size: 20rpx;
							font-weight: 400;
							color: #FFF;
							padding: 4rpx 14rpx;
							background: #000;
							border-radius: 2rpx;
							&:nth-child(2){
								color: #FFF;
								background: #c1c1c1;
								border-radius: 0px 2rpx 2rpx 0px;
							}
						}
					}
					.price{
						font-size: 32rpx;
						font-weight: 900;
						color: #000;
					}
				}
				
			}
		}
		
	}
</style>
